package ooday05.homework;

import ooday05.practise.StaticVar;

public class StaticTest {
    public static void main(String[] args) {
        //静态成员会被类的所有对象共享
        //静态成员随类的加载而加载,优先对象被创建
        //访问静态成员通过类名访问
        StaticVar staticVar=new StaticVar();
        staticVar.show();
        StaticVar staticVar1=new StaticVar();
        staticVar1.show();
        StaticVar staticVar2=new StaticVar();
        staticVar2.show();

        StaticBlock o4 = new StaticBlock();
        StaticBlock o5 = new StaticBlock();

        StaticMethod.staticShow();
        StaticMethod staticMethod=new StaticMethod();
        staticMethod.show();
    }
}
